<template>
  <a-button :id="id" @click="click" :disabled="disabled" v-bind="$attrs">
    {{ text }}
  </a-button>
</template>

<script>
export default {
  props: {
    text: {
      type: String,
      required: true,
    },
    id: {
      type: String,
      required: true,
    },
  },
  data() {
    return {
      disabled: false,
    };
  },
  created() {
    console.log(this.id);
  },
  methods: {
    click(e) {
      this.$emit('click', e);
    },
    enabled(bool) {
      this.disabled = !bool;
    },
  },
};
</script>
